<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>爱宠医院管理系统</title>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<link href="css/Common.css" rel="stylesheet" type="text/css" />
    <link href="css/sitegeneric08.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="../js/public_fuc.js"></script>
    <style type="text/css">
    	.bt-input{
    		width: 50%;height: 34px;border-radius:5px;
    	}
    	.col-2{
    		width: 90px;
    		display: inline-block;
    	}
    </style>
  </head>
  
  <body>
<!-- head如果图片高度不合适。请修改Common.ces里面的".Header .HeaderTop"的高度。和".Header"的高度-->
<jsp:include flush="true" page="incTop.jsp"></jsp:include>    
<!-- head-->
	
	
	
	
<!--body-->
<div align="center" class="Wrapper">
<div id="MainCenter" align="center" class="MainCenter">
	     <div id="navigation" class="naivgation">
				<jsp:include flush="true" page="incLeft.jsp"></jsp:include>
		 </div>
		 <div id="content" class="Sub">
				<div class="NewContainer771">
					<div class="BoxHeader">
						<div class="BoxHeader-center MarginTop10">添加病例</div>
					</div>
					<div class="Slot"  style="height: 100%">
				        <span class="col-2">宠物名</span>
						<input type='text' id='title' class="bt-input" placeholder="" />
					
				         <br/>
				         <br/>
				        <span class="col-2">宠物编号</span>
						<input type='text' id='cost' class="bt-input" placeholder="" />
					
				         <br/>
				         <br/>
				        <span class="col-2">宠物症状</span>
						<input type='text' id='building' class="bt-input" placeholder="" />
					
				         <br/>
				         <br/>
				        <span class="col-2">主人名</span>
						<input type='text' id='houseNum' class="bt-input" placeholder="" />
					
				         <br/>
				         <br/>
				      	<span class="col-2">联系方式</span>
				      	<input type="text" disabled="disabled" class="bt-input" id="createTime" placeholder="" />
				      	 <br/>
				         <br/>
				        <span class="col-2">就诊日期</span>
						<input type='text' id='remark' class="bt-input" placeholder="" />
					
				         <br/>
				         <br/>
						<button id="add_paymentbill">添加</button>
                    </div>
				</div>
		 </div>
</div>
</div>
<!--body-->
	
	
	
<!--foot -->	
<div align="center" class="Wrapper">
	<div style="height: 40px;" align="center" class="Footer">
		<ul style="margin-top: 13px;">
			<li>
				<a>网站声明</a>&nbsp;&nbsp; |&nbsp;&nbsp;
				<a>服务网点</a>&nbsp;&nbsp; |&nbsp;
				<a>网站地图</a>&nbsp; |&nbsp;&nbsp;
				<a>联系我们</a>&nbsp;&nbsp; |&nbsp;&nbsp;
				<a>客服热线：********</a> 
			</li>
		</ul>
	</div>
</div>
<!--foot -->	
<script type="text/javascript">
      $(function() {
        $("#leftnav").load("pubnav.html");
        addPaymentBill();
		var date = new Date();
		$('#createTime').val(date.ymd());
		
				
      });
      
      
      
	       //增加paymentbill
	      var addPaymentBill = function(){
	      	$('#add_paymentbill').click(function(){
	      	
		    	  var obj = {};
				  obj.title = $('#title').val();
				  obj.houseNum = $('#houseNum').val();
				  obj.detail = $('#detail').val();
				  obj.building = $('#building').val();
				  obj.phone = $('#phone').val();
				  obj.cpTime = $('#cpTime').val();
				  obj.evaluation = $('#evaluation').val();
				  obj.state = $('#state').val();
		    	  $.post("api/paymentbill/save",obj,function(data){
		    	  	  //console.log(data);
		    	  	  if (data.code==0) {
		    			  //window.location.href = 'paymentbill.jsp';
		    			   alert('添加病例单成功');
		    			   window.location.reload();
		    		  }
		    	  });
	    		  return false;
	    	  });
	      }
      
    </script> 
</body>
</html>
